window.onload = function() {
	
	var o_ope = new OrderComponent($("#orders"));
	
	var mid = $("#mid").val();
	
	o_ope.getDatawithState(mid, 0);

	$("button[id=u_order]").on("click", function() {	
		console.log(mid);
		o_ope.getDatawithState(mid, 0);
	})
	

	$("button[id=u_order]").on("click", function() {	
		console.log(mid);
		o_ope.getDatawithState(mid, 0);
	})

	$("button[id=r_order]").on("click", function() {
		o_ope.getDatawithState(mid, 1);
	})

	$("button[id=f_order]").on("click", function() {
		o_ope.getDatawithState(mid, 4);
	})
	
	
	$("button[id=d_order]").on("click", function() {
		o_ope.getDatawithState(mid, 3);
	})
	
	

}